<script setup lang="ts">
import { ElContainer, ElHeader, ElFooter } from 'element-plus'
import HeadCompoents from '@/components/HeadComponent.vue'
import FileTable from '@/components/FileTable.vue'
import { onMounted } from 'vue'

import axios from 'axios'

const myAxios = axios.create({
  // baseURL: 'http://127.0.0.1:8000',
  // withCredentials: true,
  // headers: {
  //   'Access-Control-Allow-Origin': '*',
  //   'Access-Control-Allow-Credentials': true,
  //   'Cookie':
  //     '_ga=GA1.1.2131256908.1736149414; _ga_69MPZE94D5=GS1.1.1736149413.1.1.1736149457.0.0.0; gfsessionid=1f8ya4b1qozf2bd9fipb4bcxu4200t06',
  // },
})

onMounted(() => {
  myAxios
    .post('/file/user_get_dirs_and_files', { dir_path: 'asd' })
    .then((res) => {
      console.log('user_get_dirs_and_files:', res)
    })
    .catch((err) => {
      console.log(err)
    })
})
</script>
<template>
  <div class="common-layout" style="height: 100%">
    <el-container style="height: 100%">
      <el-header>
        <head-compoents use_name="asd" />
      </el-header>
      <el-container style="overflow: auto">
        <FileTable />
        <el-footer height="60px">固定底部，功能未实现</el-footer>
      </el-container>
    </el-container>
  </div>
</template>
